<html><head><title>ProgramParameter</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">ProgramParameter()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result$ = <font color="#006666"><b>ProgramParameter</b></font>([Index])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Gets the next parameter string that was passed to the executable when it was launched. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>Index (optional)</i></td>
<td width="90%"> 
If specified, the parameter for that index will be returned. The first parameter indes starts from 0. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

The next parameter value, or an empty string if no more parameters are found. If index is specified 
it will return the specified parameter value. 

</blockquote><p><b>Remarks</b></p><blockquote>

This function is especially useful for <a href="../console/index.html">console programs</a>, where the user passes 
one or more parameter at the program start. 
<br>
<br>
<b>Note:</b> Relying on the return of an empty string to detect the last parameter is not a good practice, 
since the function also returns an empty string if an empty string was passed in "" on the command-line. 
The prefered method which should be used to get all parameters, is to get the count with <a href="countprogramparameters.html">CountProgramParameters()</a> 
and then to call ProgramParameter() as often as needed. 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  MyProgram.exe MyText.txt /FAST "Special Mode"
</font></pre>
The first time that ProgramParameter() is called, it will return "MyText.txt", the second time 
"/FAST" and the third time "Special Mode". 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=programid.html>ProgramID()</a> - <a href=index.html>Process Index</a> - <a href=programrunning.html>ProgramRunning()</a> ->

</body></html>